home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / dev / misc / RenderLib.lha / RenderLib / Include / render / render.i < prev    next >
Encoding:
Text File  |  1997-03-24  |  7.5 KB  |  273 lines

  1.     IFND RENDER_I
  2. RENDER_I    SET    1
  3. **
  4. **    $VER: render.i 18.0 (24.2.97)
  5. **
  6. **    render.library definitions
  7. **
  8. **    © 1996 TEK neosçientists
  9. **
  10.  
  11. ;------------------------------------------------------------------------
  12.  
  13.     IFND UTILITY_TAGITEM_I
  14.     include "utility/tagitem.i"
  15.     ENDC
  16.  
  17. ;------------------------------------------------------------------------
  18.  
  19. RND_TAGBASE        EQU    TAG_USER+$1000
  20.  
  21.  
  22. ;------------------------------------------------------------------------
  23. ;
  24. ;    memhandler
  25. ;
  26. ;------------------------------------------------------------------------
  27.  
  28. RND_MemType        EQU    RND_TAGBASE+1    ; type of memhandler, see below
  29. RND_MemBlock        EQU    RND_TAGBASE+2    ; ptr to block of memory
  30. RND_MemSize        EQU    RND_TAGBASE+3    ; size of memblock [bytes]
  31. RND_MemFlags        EQU    RND_TAGBASE+18    ; memflags (exec/memory.h)
  32. RND_RMHandler        EQU    RND_TAGBASE+12    ; to pass a memhandler as an argument
  33.  
  34. *
  35. *    memhandler types
  36. *
  37.  
  38. RMHTYPE_POOL        EQU    1        ; v39 exec dynamic pool
  39. RMHTYPE_PRIVATE        EQU    2        ; private memory pool
  40. RMHTYPE_PUBLIC        EQU    3        ; common public memory
  41.  
  42.  
  43. ;------------------------------------------------------------------------
  44. ;
  45. ;    palette
  46. ;
  47. ;------------------------------------------------------------------------
  48.  
  49. RND_PaletteFormat    EQU    RND_TAGBASE+19    ; palette import/export format
  50. RND_EHBPalette        EQU    RND_TAGBASE+22    ; indicate a palette is EHB
  51. RND_FirstColor        EQU    RND_TAGBASE+23    ; first color entry
  52. RND_NewPalette        EQU    RND_TAGBASE+24    ; dispose the old palette and load a new one
  53. RND_RGBWeight        EQU    RND_TAGBASE+11    ; quantization factors for ExtractPalette()
  54.  
  55. *
  56. *    palette format types
  57. *
  58.  
  59. PALFMT_RGB32        EQU    1        ; ULONG red,green,blue
  60. PALFMT_RGB8        EQU    2        ; ULONG $00rrggbb
  61. PALFMT_RGB4        EQU    3        ; UWORD    $0rgb
  62.  
  63. *
  64. *    palette sort mode types
  65. *    for the use with SortPalette()
  66. *
  67.  
  68.     ; no particular order
  69. PALMODE_NONE        EQU    $0000
  70.  
  71.     ; sort palette entries by brightness
  72. PALMODE_BRIGHTNESS    EQU    $0001        
  73.  
  74.     ; sort palette entries by the number of pixels that they represent.
  75.     ; You must supply the RND_Histogram taglist argument.
  76. PALMODE_POPULARITY    EQU    $0002
  77.  
  78.     ; sort palette entries by the number of histogram entries that they
  79.     ; represent. You must supply the RND_Histogram taglist argument.
  80. PALMODE_REPRESENTATION    EQU    $0003
  81.  
  82.     ; sort palette entries by their optical significance for the human
  83.     ; eye. Implementation is unknown to you and may change.
  84.     ; You must supply the RND_Histogram taglist argument.
  85. PALMODE_SIGNIFICANCE    EQU    $0004
  86.  
  87.     ; sort palette entries by color intensity
  88. PALMODE_SATURATION    EQU    $0005
  89.  
  90.     ; By default, sort direction is descending, i.e. the precedence is
  91.     ; more-to-less. Combine with this flag to invert the sort direction.
  92. PALMODE_ASCENDING    EQU    $0008
  93.  
  94.  
  95. ;------------------------------------------------------------------------
  96. ;
  97. ;    histogram related
  98. ;
  99. ;------------------------------------------------------------------------
  100.  
  101. RND_HSType        EQU    RND_TAGBASE+4    ; histogram type, see below
  102. RND_Histogram        EQU    RND_TAGBASE+9    ; to pass a histogram as an argument
  103.  
  104. *
  105. *    Histogram / Palette types
  106. *    to be specified with RND_HSType
  107. *
  108.  
  109. HSTYPE_12BIT        EQU    4        ; 12bit dynamic histogram
  110. HSTYPE_15BIT        EQU    5        ; 15bit dynamic histogram
  111. HSTYPE_18BIT        EQU    6        ; 18bit dynamic histogram
  112. HSTYPE_21BIT        EQU    7        ; 21bit dynamic histogram
  113. HSTYPE_24BIT        EQU    8        ; 24bit dynamic histogram
  114. HSTYPE_12BIT_TURBO    EQU    20        ; 12bit tabular histogram
  115. HSTYPE_15BIT_TURBO    EQU    21        ; 15bit tabular histogram
  116. HSTYPE_18BIT_TURBO    EQU    22        ; 18bit tabular histogram
  117.  
  118. *
  119. *    tags that can be queried via QueryHistogram()
  120. *
  121.  
  122. RND_NumPixels        EQU    RND_TAGBASE+5    ; # pixels in a histogram
  123. RND_NumColors        EQU    RND_TAGBASE+6    ; # colors in a histogram
  124.  
  125.  
  126. ;------------------------------------------------------------------------
  127. ;
  128. ;    rendering and conversions
  129. ;
  130. ;------------------------------------------------------------------------
  131.  
  132. RND_ColorMode        EQU    RND_TAGBASE+7    ; color mode, see below
  133. RND_DitherMode        EQU    RND_TAGBASE+8    ; dither mode, see below
  134. RND_DitherAmount    EQU    RND_TAGBASE+26    ; dither amount
  135. RND_OffsetColorZero    EQU    RND_TAGBASE+10    ; first color index to be output
  136.  
  137. *
  138. *    color mode types
  139. *    to be specified with RND_ColorMode
  140. *
  141.  
  142. COLORMODE_CLUT        EQU    $0000        ; normal palette lookup
  143. COLORMODE_HAM8        EQU    $0001        ; HAM8 mode
  144. COLORMODE_HAM6        EQU    $0002        ; HAM6 mode
  145. COLORMODE_MASK        EQU    $0003        ; mask to determine COLORMODE
  146.  
  147. *
  148. *    dither mode types
  149. *    to be specified with RND_DitherMode
  150. *
  151.  
  152. DITHERMODE_NONE        EQU    $0000        ; no dither
  153. DITHERMODE_FS        EQU    $0001        ; Floyd-Steinberg dither
  154. DITHERMODE_RANDOM    EQU    $0002        ; random dither
  155.  
  156.  
  157. ;------------------------------------------------------------------------
  158. ;
  159. ;    miscellaneous
  160. ;
  161. ;------------------------------------------------------------------------
  162.  
  163. RND_ProgressHook    EQU    RND_TAGBASE+13    ; progress callback hook
  164. RND_SourceWidth        EQU    RND_TAGBASE+14    ; total input width [pixels]
  165. RND_DestWidth        EQU    RND_TAGBASE+15    ; total output width [pixels]
  166. RND_PenTable        EQU    RND_TAGBASE+16    ; ptr to a chunky conversion table
  167. RND_LeftEdge        EQU    RND_TAGBASE+17    ; chunky data left edge [pixels]
  168. RND_LineHook        EQU     RND_TAGBASE+20    ; line callback hook
  169.  
  170.  
  171. ;------------------------------------------------------------------------
  172. ;
  173. ;    PixelFormat
  174. ;
  175. ;------------------------------------------------------------------------
  176.  
  177. RND_PixelFormat        EQU    RND_TAGBASE+25    ; pixel format, see below
  178.  
  179. PIXFMTB_CHUNKY        EQU    3
  180. PIXFMTB_BITMAP        EQU    4
  181. PIXFMTB_RGB        EQU    5
  182.  
  183. PIXFMT_CHUNKY_CLUT    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_CLUT
  184. PIXFMT_CHUNKY_HAM8    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_HAM8
  185. PIXFMT_CHUNKY_HAM6    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_HAM6
  186.  
  187. PIXFMT_BITMAP_CLUT    EQU    1<<PIXFMTB_BITMAP+COLORMODE_CLUT
  188. PIXFMT_BITMAP_HAM8    EQU    1<<PIXFMTB_BITMAP+COLORMODE_HAM8
  189. PIXFMT_BITMAP_HAM6    EQU    1<<PIXFMTB_BITMAP+COLORMODE_HAM6
  190.  
  191. PIXFMT_0RGB_32        EQU    1<<PIXFMTB_RGB+0
  192.  
  193.  
  194. ;------------------------------------------------------------------------
  195. ;
  196. ;    ExtractPalette return codes
  197. ;
  198. ;    You must at least check for EXTP_SUCCESS.
  199. ;    EXTP_DATA indicates that there were no colors
  200. ;    inside the histogram.
  201. ;
  202. ;------------------------------------------------------------------------
  203.  
  204. EXTP_SUCCESS            EQU    0
  205. EXTP_NOT_ENOUGH_MEMORY        EQU    1
  206. EXTP_CALLBACK_ABORTED        EQU    2
  207. EXTP_NO_DATA            EQU    3
  208.  
  209.  
  210. ;------------------------------------------------------------------------
  211. ;
  212. ;    AddRGB, AddRGBImage, AddChunkyImage return codes
  213. ;
  214. ;    You must at least check for ADDH_SUCCESS.
  215. ;    If not returned, the histogram is no longer
  216. ;    guaranteed to be accurate.
  217. ;
  218. ;------------------------------------------------------------------------
  219.  
  220. ADDH_SUCCESS            EQU    0
  221. ADDH_NOT_ENOUGH_MEMORY        EQU    1
  222. ADDH_CALLBACK_ABORTED        EQU    2
  223. ADDH_NO_DATA            EQU    3
  224.  
  225.  
  226. ;------------------------------------------------------------------------
  227. ;
  228. ;    Render return codes
  229. ;
  230. ;    You must at least check for REND_SUCCESS.
  231. ;    If not returned, the image wasn't completely
  232. ;    and correctly rendered.
  233. ;
  234. ;------------------------------------------------------------------------
  235.  
  236. REND_SUCCESS            EQU    0
  237. REND_NOT_ENOUGH_MEMORY        EQU    1
  238. REND_CALLBACK_ABORTED        EQU    2
  239. REND_NO_VALID_PALETTE        EQU    3
  240.  
  241.  
  242. ;------------------------------------------------------------------------
  243. ;
  244. ;    SortPalette return codes
  245. ;
  246. ;    You must at least check for SORTP_SUCCESS.
  247. ;    SORTP_NO_DATA indicates that there were data missing,
  248. ;    e.g. you specified no histogram or the histogram was empty.
  249. ;
  250. ;------------------------------------------------------------------------
  251.  
  252. SORTP_SUCCESS            EQU    0
  253. SORTP_NO_DATA            EQU    1
  254. SORTP_NOT_ENOUGH_MEMORY        EQU    2
  255.  
  256.  
  257. ;------------------------------------------------------------------------
  258. ;
  259. ;    conversion return codes
  260. ;
  261. ;    These return codes apply to conversion functions
  262. ;    such as Chunky2RGB.
  263. ;
  264. ;------------------------------------------------------------------------
  265.  
  266. CONV_SUCCESS            EQU    0
  267. CONV_CALLBACK_ABORTED        EQU    1
  268.  
  269.  
  270. ;========================================================================
  271.  
  272.     ENDC
  273.